package com.hxkj.client.service;

import com.github.pagehelper.PageInfo;
import com.hxkj.domain.po.UserArticle;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;


/**
 * @author chenfangzhou
 * @create 2018/8/13
 * @desc 文章收藏对外接口
 **/
@FeignClient(name = "cms-management")
public interface ArticleCollectionServiceClient {
    /**
     * 收藏文章
     */
    @RequestMapping(value = "/article/collectArticle", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    ResultMessageStruct collectArticle(@RequestBody UserArticle userArticle ) throws Exception;

    /**
     * 取消收藏文章
     */
    @RequestMapping(value = "/article/cancelCollectArticle", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    ResultMessageStruct cancelCollectArticle(@RequestBody UserArticle userArticle) throws Exception;

    /**
     * 文章收藏状态
     * @param userArticle
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/article/ifCollectArticle", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    Integer ifCollectArticle(@RequestBody UserArticle userArticle) throws Exception;

    /**
     * 获取收藏文章列表
     */
    @RequestMapping(value = "/article/getCollectionList", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    PageInfo<UserArticle> getCollectionList(@RequestBody ParameterDataStruct<UserArticle> parameterDataStruct) throws Exception;
}
